/******************************************************************************

 @File         PVRShellOS.h

 @Title        Qt/PVRShellOS

 @Version      

 @Copyright    Copyright (C)  Imagination Technologies Limited.

 @Platform     Qt

 @Description  Makes programming for 3D APIs easier by wrapping surface
               initialization, Texture allocation and other functions for use by a demo.

******************************************************************************/
#ifndef _PVRSHELLOS_
#define _PVRSHELLOS_

/****************************************************************************
 ** INCLUDES                                                               **
 ****************************************************************************/
#include <QMainWindow>
#include <QTimer>
#include <QTime>

/****************************************************************************
 ** DEFINES                                                               **
 ****************************************************************************/
#define PVRSHELL_DIR_SYM	'/'
#define _stricmp strcasecmp
#define _strnicmp strncasecmp

/*!***************************************************************************
 PVRShellInitOS
 @Brief Class. Interface with specific Operative System.
*****************************************************************************/
class PVRShell;
class PVRShellInit;

class PVRShellMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    PVRShellMainWindow(PVRShellInit *pInit);
    virtual void keyPressEvent(QKeyEvent* keyEvent);
    virtual void mousePressEvent(QMouseEvent *mouseEvent);
    virtual void mouseReleaseEvent(QMouseEvent *mouseEvent);
    virtual void mouseMoveEvent(QMouseEvent *mouseEvent);
    virtual QSize sizeHint();
    bool IsTouched();
    float* GetTouchPosition();

protected:
    PVRShellInit *m_pInit;
    bool m_bTouch;
    float m_fVec2PointerLocation[2];
};

class PVRShellTimer : public QTimer
{
    Q_OBJECT

public:
    PVRShellTimer(QObject *parent = 0);
    virtual ~PVRShellTimer();
    bool Init(int argc, char **argv);
    void DeInit();

private slots:
    void Run();

protected:
    PVRShellInit *m_pInit;
};

class PVRShellInitOS
{
public:
        PVRShellMainWindow *m_pWindow;
        QTime m_Time;
};

#endif /* _PVRSHELLOS_ */
/*****************************************************************************
 End of file (PVRShellOS.h)
*****************************************************************************/


